package tgc.edu.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.tms.custom.CommonRepository;
import tgc.edu.tms.entity.EducationalPlanner;

@Repository
public interface EducationalPlannerRepository extends CommonRepository<EducationalPlanner, Integer>{
	
	
	@Query(value="select max(id) from educational_planner",nativeQuery=true)
	public Integer findByMaxId();

	public List<EducationalPlanner> findBySchoolyearId(Integer schoolyearID);

	public List<EducationalPlanner> findBySchoolyearIdAndCurriculumProfessionId(Integer schoolyearId,
			Integer profesion);

	public List<EducationalPlanner> findBySchoolyearIdAndCurriculumProfessionIdAndTeacherUsername(Integer schoolyearId,
			Integer profesion, String username);

}
